Engineering Definitional Interpreters ( Extended Version )

نویسندگان

  • Jan Midtgaard
  • Norman Ramsey
  • Bradford Larsen
چکیده

A definitional interpreter should be clear and easy to write, but it may run 4–10 times slower than a well-crafted bytecode interpreter. In a case study focused on implementation choices, we explore ways of making definitional interpreters faster without expending much programming effort. We implement, in OCaml, interpreters based on three semantics for a simple subset of Lua. We compile the OCaml to x86 native code, and we systematically investigate hundreds of combinations of algorithms and data structures. In this experimental context, our fastest interpreters are based on natural semantics; good algorithms and data structures make them 2–3 times faster than naı̈ve interpreters. Our best interpreter, created using only modest effort, runs only 1.5 times slower than a mature bytecode interpreter implemented in C.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Definitional Interpreters Revisited

To introduce the republication of “Definitional Interpreters for Higher-Order Programming Languages”, the author recounts the circumstances of its creation, clarifies several obscurities, corrects a few mistakes, and briefly summarizes some more recent developments.

متن کامل

Rules of Definitional Reflection

This paper discusses two rules of definitional reflection: The “logical” version of definitional reflection as used in the extended logic programming language GCLA and the “ω”-version of definitional reflection as proposed by Eriksson and Girard. The logical version is a Left-introduction rule completely analogous to the Left-introduction rules for logical operators in Gentzen-style sequent sys...

متن کامل

A Complete Bibliography of Publications in Higher-Order Symbolic Computation

p [6]. -Calculus [6]. Actor [9]. Algorithmic [2]. Approach [5]. Binding [8]. Calculus [6, 13]. Composable [9]. CPS [5]. Definitional [10, 11]. Direct [6]. Dynamic [8]. Editorial [1]. Extended [13]. First [12]. Generalization [3, 4]. Higher [11]. Higher-Order [11]. Interpreter [13]. Interpreters [10, 11]. Introduction [3]. Jumps [3, 4]. Labels [3, 4]. Lambda [13]. Landin [3]. Language [2]. Langu...

متن کامل

A Rewrite Framework for Language Definitions and for Generation of Efficient Interpreters

A rewrite logic semantic definitional framework for programming languages is introduced, called K, together with partially automated translations of K language definitions into rewriting logic and into C. The framework is exemplified by defining SILF, a simple imperative language with functions. The translation of K definitions into rewriting logic enables the use of the various analysis tools ...

متن کامل

Modular interpreters with implicit context propagation

Modular interpreters are a crucial first step towards component-based language development: instead of writing language interpreters from scratch, they can be assembled from reusable, semantic building blocks. Unfortunately, traditional language interpreters can be hard to extend because different language constructs may require different interpreter signatures. For instance, arithmetic interpr...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2013